package callback;

/**
 * Created by Zhou_Bing on 2019/2/21.
 */
public class Demo {


    public static void run(CallBack callBack){
        System.out.println("函数执行中.....");
        callBack.execute();
    }


    public static void main(String[] args){

        run(new CallBack() {
            @Override
            public void execute() {
                System.out.println("回调函数执行中....");
            }
        });

    }


    interface CallBack{
        void execute();
    }
}
